<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>控制台管理</title>
</head>
<body>
<div style="float:right;margin-right:100px">
  <a class="layui-btn layui-btn-warm layui-btn-xs"  id="today">当天</a>
  <a class="layui-btn layui-btn-normal layui-btn-xs"  id="week">最近一周</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs"  id="month">最近一个月</a>
</div>
<!--<div class="layui-input-inline">
  <select name="status">
    <option value="0">当天</option>
    <option value="7">最近一周</option>
    <option value="30">最近一个月</option>
  </select>
</div>-->

<div id="a1" style="height:400px;"></div>

<div class="layui-form" lay-filter="region-search" >
  <div class="layui-input-inline">
    <input type="text" name="userName" placeholder="请输入用户名称"
           autocomplete="off" class="layui-input">
  </div>
  <button class="layui-btn layuiadmin-btn-list" lay-submit
          lay-filter="userName">
    <i class="layui-icon layui-icon-search"></i>
  </button>
</div>
<table class="layui-hide" id="regionTable" lay-filter="regionTable"></table>

<script type="text/javascript">
    var table = layui.table;
    var form = layui.form;
    var searchForm = form.render(null,'region-search');
    searchForm.on('submit(userName)', function(data) {
        tableIns.reload({
            where : {
                'userName' : data.field.userName
            },
			page:{
				curr:1
			}
        });
        return false;
    });
    var tableIns = table.render({
        elem : '#regionTable',
        url : window.basePath+ '/log/findLoginLogByPage',
				method: "post",
				headers: {"token" : window.token},
        height : 'full-150',
        cols : [ [ {
            field : 'logId',
            width : 80,
            title : '编号',
            align : 'center',
            sort : true
        },{
            field : 'userId',
            width : 80,
            align : 'center',
            title : '用户ID'
        },{
            field : 'userName',
            width : 200,
            align : 'center',
            title : '用户名称'
        }, {
            field : 'loginTime',
            width : 200,
            align : 'center',
            title : '登录时间',
            sort : true
        }] ],
        text : {
            none : '暂无相关数据' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
        },
        page : true
    });
</script>


</body>
</html>
<script src="../admin/js/echarts-all.js"></script>
<script src="../admin/js/chart.js"></script>

